package com.site.controller.site;

import com.site.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by robin on 2016/12/19.
 * 联系我们 controller
 */
@Controller
@RequestMapping("contact")
public class ContactController {
    @Autowired
    private BannerService service;

    @RequestMapping("index")
    public String index(Model model){
        model.addAttribute("plate","contact");
        model.addAttribute("banner",service.selectByCate("contact"));
        return "site/contact/contact";
    }
}
